home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / include / RCS / netHppi.h,v < prev    next >
Encoding:
Text File  |  1992-08-05  |  3.9 KB  |  150 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    elm:1.2; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.2
  10. date     92.07.06.14.40.39;  author elm;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     92.06.30.12.41.32;  author elm;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @Include file for using the network HPPI code.  This allows other modules
  22. to access the connection-based HPPI stuff.
  23. @
  24.  
  25.  
  26. 1.2
  27. log
  28. @Fixed up interface structures, and added declarations of externally
  29. visible routines.
  30. @
  31. text
  32. @
  33. /***********************************************************************
  34.  *
  35.  * netHppi.h
  36.  *
  37.  *    The include file for other modules to use the HPPI network
  38.  *    routines.
  39.  *
  40.  * Copyright 1991 Regents of the University of California
  41.  * Permission to use, copy, modify, and distribute this
  42.  * software and its documentation for any purpose and without
  43.  * fee is hereby granted, provided that the above copyright
  44.  * notice appear in all copies.  The University of California
  45.  * makes no representations about the suitability of this
  46.  * software for any purpose.  It is provided "as is" without
  47.  * express or implied warranty.
  48.  *
  49.  * $Header: /sprite/src/lib/include/RCS/netHppi.h,v 1.1 92/06/30 12:41:32 elm Exp Locker: elm $
  50.  *
  51.  ***********************************************************************
  52.  */
  53.  
  54. #ifndef _NETHPPI
  55. #define    _NETHPPI
  56.  
  57. #include <sprite.h>
  58. #include <list.h>
  59. #include "net.h"
  60. #include "netTypes.h"
  61. #include "netUltra.h"
  62.  
  63. /*
  64.  * A callback routine for HPPI stuff.
  65.  */
  66. typedef void (*Net_HppiCallback)();
  67.  
  68. /*
  69.  * Single scatter-gather element.
  70.  */
  71. typedef struct Net_HppiSGElem {
  72.     Address    addr;
  73.     int        length;
  74. } Net_HppiSGElem;
  75.  
  76. /*
  77.  * This structure is passed between the HPPI module and higher-level
  78.  * software.  It contains all the connection information that lower
  79.  * and higher level modules should share.
  80.  */
  81. typedef struct Net_HppiConnection {
  82.     Net_Interface*    interPtr;    /* network interface to use */
  83.     unsigned int    connectionId;    /* OUT: connection identifier */
  84.     unsigned int    flags;        /* flags for connection */
  85.     ReturnStatus    status;        /* OUT: connection status */
  86.     ClientData        userData;
  87.     Net_HppiCallback    callbackProc;
  88.     Net_UltraAddress    destAddress;    /* HPPI address to connect to */
  89.     unsigned int    outstandingRecvs;  /* max # of outstanding requests */
  90.     unsigned int    outstandingSends;  /* (for send & receive) */
  91. } Net_HppiConnection;
  92.  
  93. /*
  94.  * This structure describes a single transfer over the HPPI.  There
  95.  * will be many of these per connection, and there may be several
  96.  * outstanding at once.
  97.  */
  98. typedef struct Net_HppiDataRequest {
  99.     List_Links        links;
  100.     Net_Interface*    interPtr;    /* interface request belongs to */
  101.     unsigned int    connectionId;    /* connection data should go on */
  102.     unsigned int    flags;        /* flags for request */
  103.     unsigned int    status;        /* OUT: status of connection */
  104.     ClientData        userData;
  105.     Net_HppiCallback    callbackProc;
  106.     unsigned int    xferSize;    /* total size of transfer */
  107.     unsigned int    xferOffset;    /* offset of first byte within conn */
  108.     unsigned int    sgSize;        /* # of elements in following array */
  109.     Net_HppiSGElem    sg[1];        /* scatter-gather array */
  110. } Net_HppiDataRequest;
  111.  
  112. #define    NET_HPPI_DATA_LAST_SEND    0x1    /* last send in message */
  113.  
  114. extern ReturnStatus    Net_HppiConnectionListen _ARGS_((Net_HppiConnection*
  115.                             connStatusPtr));
  116. extern ReturnStatus    Net_HppiReceiveData _ARGS_
  117.                 ((Net_HppiConnection* connPtr,
  118.                   Net_HppiDataRequest* dataReqPtr));
  119. extern ReturnStatus    Net_HppiSendData _ARGS_((Net_HppiConnection* connPtr,
  120.                   Net_HppiDataRequest* dataReqPtr));
  121. extern ReturnStatus    Net_HppiConnectionClose _ARGS_((Net_HppiConnection*
  122.                             connPtr));
  123.  
  124. #endif    /* _NETHPPI */
  125. @
  126.  
  127.  
  128. 1.1
  129. log
  130. @Initial revision
  131. @
  132. text
  133. @d1 1
  134. d18 2
  135. a22 4
  136. #ifndef lint
  137. static char rcsid[] = "$Header: Locker:$";
  138. #endif /* not lint */
  139.  
  140. d54 1
  141. d58 2
  142. a59 2
  143.     unsigned int    outstandingReads;  /* max # of outstanding requests */
  144.     unsigned int    outstandingWrites; /* (for read & write) */
  145. d72 1
  146. a76 1
  147.     unsigned int    status;        /* OUT: status of connection */
  148. d82 10
  149. @
  150.